package com.zyk.scaffold.seata.biz.feign.stock;

import com.zyk.scaffold.core.domain.Result;
import com.zyk.scaffold.seata.biz.feign.stock.request.StockRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "backend-scaffold-seata-stock", path = "/stock")
public interface StockFeignClient {

    @PostMapping("/stock/ok")
    Result<Boolean> ok(@RequestBody StockRequest stockRequest);

    @PostMapping("/stock/error")
    Result<Boolean> error(@RequestBody StockRequest stockRequest);

    @PostMapping("/stock/none_seata_ok")
    Result<Boolean> none_seata_ok(@RequestBody StockRequest stockRequest);

    @PostMapping("/stock/none_seata_error")
    Result<Boolean> none_seata_error(@RequestBody StockRequest stockRequest);
}
